package com.woniu.outlet.rabbitmq;

import com.woniu.config.EnergyRabbitConfig;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class EnergyRabbitmqRepo {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendAppMessage(String message){
        rabbitTemplate.convertAndSend("energy_exchange","energy.add",message);
    }
}
